#pragma once
#include <vector>
#include "common\define.h"
// #include "../public/infer_base.hpp"

#include "opencv2/opencv.hpp"
#include <opencv2\highgui.hpp>
#include <opencv2\imgproc.hpp>
#include "openvino/openvino.hpp"

// #include "cuda_img_resize.cuh"
#include "../txr_algo_dlm_cls/txr_algo_dlm_cls_define.h"



using namespace ov;
using namespace std;
using namespace cv;
using namespace dnn;

namespace txr_algo_dlm_cls
{


class InferClsV2 
{
	#define DATS_EXTENSION ".ocls2"

	public:
		InferClsV2();
		virtual ~InferClsV2();
		bool Init(int gpu_id, const char* dats_path) ;
		void Detect(st_detect_unit* p_unit, int num);
		int BatchSize() const { return m_info.batch_size; }
	protected:
	private:
		bool LoadEngine(std::vector<char> v_engine_data) ;

	private:
		int m_out_size =  0 ;
		std::vector<float> m_v_out_buf;
		
        st_encrypt_info_cls2_o m_info;    // 模型信息
		
        ov::Core core;
        ov::CompiledModel compiled_model; 
        std::vector<ov::InferRequest> infer_requests;
        std::vector<ov::Tensor> m_v_tensors;

};

}//txr_algo_dlm_seg